<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>Page principale</title>
	
  	<link rel="stylesheet" href="<c:url value="/resources/Styles/styles.css"/>"/>
	<script src="<c:url value="/resources/js/jquery-1.8.3.js"/>"></script>

  	<script>
	function validParticipationOk(){
		$('#ValidationParticipationForm').attr('action', 'validParticipationOk');
		$('#ValidationParticipationForm').submit();
	}

</script>
<style>
.error {
	color: #ff0000;
}
 
.errorblock {
	color: #000;
	background-color: #ffEEEE;
	border: 3px solid #ff0000;
	padding: 8px;
	margin: 16px;
}
</style>

</head>
<body>

<form:form method="post" commandName="ValidationParticipationForm" id="ValidationParticipationForm">

<table border="1" width="100%" align="center">
	<tr>
		<th width="60%">Question</th>
		<th width="20%">Reponse</th>
		<th width="20%"></th>
	</tr>
	<tr>
		<td><h3><spring:message code="participation.question1"/></h3></td>
		<td><form:radiobuttons path="reponse1" items="${propositions1}"/></td>
		<td><form:errors path="reponse1" cssClass="error"></form:errors></td>
	</tr><tr>
		<td><h3><spring:message code="participation.question2"/></h3></td>
		<td><form:radiobuttons path="reponse2" items="${propositions1}"/></td>
		<td><form:errors path="reponse2" cssClass="error" /></td>
	</tr><tr>
		<td><h3><spring:message code="participation.question3"/></h3></td>
		<td><form:radiobuttons path="reponse3" items="${propositions1}"/></td>
		<td><form:errors path="reponse3" cssClass="error" /></td>
	</tr><tr>
		<td><h3><spring:message code="participation.question4"/></h3></td>
		<td><form:radiobuttons path="reponse4" items="${propositions1}"/></td>
		<td><form:errors path="reponse4" cssClass="error" /></td>
	</tr><tr>
		<td><h3><spring:message code="participation.question5"/></h3></td>
		<td><form:radiobuttons path="reponse5" items="${propositions1}"/></td>
		<td><form:errors path="reponse5" cssClass="error" /></td>
	</tr><tr>
		<td><h3><spring:message code="participation.question6"/></h3></td>
		<td><form:radiobuttons path="reponse6" items="${propositions2}"/></td>
		<td><form:errors path="reponse6" cssClass="error" /></td>
	</tr><tr>
		<td><h3><spring:message code="participation.question7"/></h3></td>
		<td><form:radiobuttons path="reponse7" items="${propositions2}"/></td>
		<td><form:errors path="reponse7" cssClass="error" /></td>
	</tr><tr>
		<td><h3>${question}</h3></td>
		<td>
			<form:radiobutton path="reponse" value="1" label="${proposition1}"/><br/>
			<form:radiobutton path="reponse" value="2" label="${proposition2}"/><br/>
			<form:radiobutton path="reponse" value="3" label="${proposition3}"/><br/>
			<form:radiobutton path="reponse" value="4" label="${proposition4}"/>
		</td>
		<td><form:errors path="reponse" cssClass="error"></form:errors></td>
	</tr><tr>
		<td colspan="3" align="right">
			<a onclick="javascript:validParticipationOk();">
				<img src= "<c:url value="/resources/img/validParticipation.png" />" title="validParticipationOk"/>
			</a>
		</td>
	</tr>
</table>

<form:hidden path="idApp" id="idApp"/>

</form:form>
</body>
</html>